﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp.Demos.SimplePipeline
{
    public class HttpResponseByCustom
    {
        private readonly IHttpResponseFeatureByCustom _feature;

        public HttpResponseByCustom(IFeatureCollectionByCustom featrues)
        {
            _feature = featrues.Get<IHttpResponseFeatureByCustom>();
        }

        public int StatusCode
        {
            get => _feature.StatusCode;
            set => _feature.StatusCode = value;
        }

        public NameValueCollection Headers => _feature.Headers;

        public Stream Body => _feature.Body;
    }
}
